/*
 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package java.lang.reflect;

/**
 * Member is an interface that reflects identifying information about
 * a single member (a field or a method) or a constructor.
 *
 * @see java.lang.Class
 * @see Field
 * @see Method
 * @see Constructor
 *
 * @author Nakul Saraiya
 */
public
interface Member {

    /**
     * Identifies the set of all public members of a class or interface,
     * including inherited members.
     */
    // 标识类或接口的已声明成员集。不包括继承的成员。
    public static final int PUBLIC = 0;

    /**
     * Identifies the set of declared members of a class or interface.
     * Inherited members are not included.
     */
    // 标识类或接口的已声明成员集。不包括继承的成员。
    public static final int DECLARED = 1;

    /**
     * Returns the Class object representing the class or interface
     * that declares the member or constructor represented by this Member.
     *
     * @return an object representing the declaring class of the
     * underlying member
     */
    // 返回 Class 对象，该对象表示声明此成员表示的成员或构造函数的类或接口。
    // 返回：
    // 表示基础成员的声明类的对象
    public Class<?> getDeclaringClass();

    /**
     * Returns the simple name of the underlying member or constructor
     * represented by this Member.
     *
     * @return the simple name of the underlying member
     */
    // 返回此成员表示的基础成员或构造函数的简单名称。
    // 返回：
    // 基础成员的简单名称
    public String getName();

    /**
     * Returns the Java language modifiers for the member or
     * constructor represented by this Member, as an integer.  The
     * Modifier class should be used to decode the modifiers in
     * the integer.
     *
     * @return the Java language modifiers for the underlying member
     * @see Modifier
     */
    // 以整数形式返回此成员表示的成员或构造函数的 Java 语言修饰符。
    // 应使用 Modifier 类对整数中的修饰符进行解码。
    // 返回：
    // 基础成员的 Java 语言修饰符
    public int getModifiers();

    /**
     * Returns {@code true} if this member was introduced by
     * the compiler; returns {@code false} otherwise.
     *
     * @return true if and only if this member was introduced by
     * the compiler.
     * @jls 13.1 The Form of a Binary
     * @since 1.5
     */
    // 如果此成员是由编译器引入的，则返回true;否则返回false。
    // 返回：
    // 当且仅当此成员由编译器引入时，才为 true。
    public boolean isSynthetic();
}
